import NewsList from '../views/mysample/NewsList';
import List from '../views/mySample2/List';
import BasicLayout from '../layouts/BasicLayout';
const RouteView = {
    name: 'RouteView',
    render: (h) => h('router-view')
}

export default [{
    path: '/',
    component: BasicLayout,
    //重定向到路径/my_sample
    redirect: '/my_sample',
    children: [{
        //由于根路径“/”已指定调用组件BasicLayout，子路径都是从属于根路径的，所以根路径指定的模板组件会应用到子路径对应的组件
        path: '/my_sample',
        component: RouteView,
        redirect: '/my_sample/news',
        children: [{
            path: '/my_sample/news',
            component: NewsList
        },{
            path: '/my_sample/user',
            component: List
        }]
    }],
}, {
    path: '/404',
    component: () => import('../views/exception/404')
}];